package com.work.app.bean;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import javax.validation.constraints.NotNull;

import java.io.Serializable;

import java.util.Date;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import lombok.Data;

/**
 * 交易
 * @Date 2024-05-15 21:09:05
 * @author hjj
 */
@Data
@TableName("transaction")
@ApiModel(value="Transaction对象", description="交易")
public class Transaction implements Serializable {

    @NotNull(message="[]不能为空")
    @ApiModelProperty("")
    private Integer id;

    @NotBlank(message="[交易哈希]不能为空")
    @Size(max= 128,message="编码长度不能超过128")
    @ApiModelProperty("交易哈希")
    private String transactionHash;

    @NotNull(message="[买家id]不能为空")
    @ApiModelProperty("买家id")
    private Integer buyerId;

    @NotNull(message="[卖家信息]不能为空")
    @ApiModelProperty("卖家信息")
    private Integer sellerId;

    @NotBlank(message="[交易证书图片]不能为空")
    @Size(max= 128,message="编码长度不能超过128")
    @ApiModelProperty("交易证书图片")
    private String dealImgUrl;

    @NotNull(message="[价格]不能为空")
    @ApiModelProperty("价格")
    private Double dealPrice;

    @NotBlank(message="[交易编号]不能为空")
    @Size(max= 128,message="编码长度不能超过128")
    @ApiModelProperty("交易编号")
    private String dealIdentifier;

    @NotNull(message="[藏品id]不能为空")
    @ApiModelProperty("藏品id")
    private Integer collectionId;

    @ApiModelProperty("创建时间")
    private Date createTime;

}
